<!--
 * Created by PhpStorm.
 * User: jackhhy
 * Date: 2019/7/24-14:19
 * Link: https://gitee.com/luckygyl/LuckyAdmin
 * FileName: edit_content.html
 *-->


{include file="public/open_head" /}



<div class="ok-body" >

    <div class="layui-fluid" >

        <form class="layui-form" style="margin-top: 30px;">

            <div class="layui-form-item " style=""  >
                <label class="layui-form-label" >所属栏目：</label >
                <div class="layui-input-inline input-custom-width">
                    <select name="navigate_id" lay-search=""  lay-verify="required" lay-verType="tips" lay-reqText="请选择栏目" >
                        <option value="">请选择栏目</option>
                        {volist name="navigate" id="v"}
                        <option value="{$v.id}" {eq name="$v.pid" value="0" } disabled {/eq} {eq name="$info.navigate_id" value="$v.id" } selected {/eq} >├─ {$v.title}</option>
                        {/volist}
                    </select>
                </div >
            </div >

            <div class="layui-form-item " style=""  >
                <label class="layui-form-label" >内容标题：</label >
                <div class="layui-input-block input-custom-width " style="width: 350px;" >
                    <input type="text" name="title" value="{$info.title}" placeholder="请输入标题" lay-verify="required" lay-verType="tips" lay-reqText="请输入标题" autocomplete="off"  class="layui-input name" >
                </div >
            </div >


            {:token()}

            <input type="hidden" name="id" value="{$info.id}" >
            <div class="layui-form-item "  >
                <label class="layui-form-label" >摘要：</label >
                <div class="layui-input-inline input-custom-width" style="width: 450px;" >
                    <textarea class="layui-textarea" autocomplete="off" name="description" placeholder="请输入摘要">{$info.description}</textarea>
                </div >
            </div >

            <div class="layui-form-item " >
                <label class="layui-form-label" >点击量：</label >
                <div class="layui-input-inline input-custom-width " >
                    <input type="number" min="0" name="hits" value="{$info.hits}" lay-verify="required" lay-verType="tips" lay-reqText="点击量" autocomplete="off"  class="layui-input" >
                </div >
                <div class="layui-form-mid layui-word-aux">内容的点击数量</div>
                <label class="layui-form-label" >添加时间：</label >
                <div class="layui-input-inline input-custom-width " >
                    <input type="text"  value="{$info.create_time}"  autocomplete="off"  class="layui-input" >
                </div >
            </div >


            <div class="layui-form-item ">
                <label class="layui-form-label">文章内容：</label>
                <div class="layui-input-block">
                    <textarea name="content"  placeholder="文章内容" lay-verify="content1" id="LAY_demo1"  > {$info.content} </textarea>
                </div>
            </div>

            <div class="layui-form-item layui-layout-admin " style="width: 100%">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0px;text-align: center;">
                        <button class="layui-btn" lay-submit="" lay-filter="add">立即提交</button>
                    </div>
                </div>
            </div>


        </form>

    </div >


</div >

<!-- 配置文件 -->
<script type="text/javascript" src="{__PLUG_PATH}ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="{__PLUG_PATH}ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('LAY_demo1', {
        autoHeightEnabled:false,
        initialFrameHeight:350,
        zIndex : 0,
    });
</script>

<script >


    layui.use(['element', 'form', 'jquery', 'upload','layedit'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var $ = layui.jquery;
        var upload = layui.upload;
        var layedit=layui.layedit;


        /**
         * 提交表单数据
         */
        form.on('submit(add)', function (data) {
            FormSubmit("{:url('page/EditContent')}", data.field, "table_id", 1);
            return false;
        });




    })
</script >


</body>
</html>